package com.kfit.java8.lambda.test.bean;

public class Person {
	private int id;
	private String name;
	private Integer age;
	
	public Person() {
	}
	
	public Person(int id, String name,int age) {
		super();
		this.id = id;
		this.age = age;
		this.name = name;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	 public static int compareByAge(Person p1,Person p2){
	        return p1.getAge().compareTo(p2.getAge());
	 }
	
	@Override
	public String toString() {
		return "Person [id=" + id + ", name=" + name + ", age=" + age + "]";
	}
}
